package com.bk.ouatadmin.dao;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.bk.ouatadmin.dto.ContentsDto;

@Repository
public class ContentsDao extends SqlSessionDaoSupport  {
	
	public List<ContentsDto> list(ContentsDto contentsDto) {
		return (List<ContentsDto>)getSqlSession().selectList("contentsQuery.list", contentsDto);
	}
	
	public int count(ContentsDto contentsDto) {
		return (Integer)getSqlSession().selectOne("contentsQuery.count", contentsDto);
	}
	
	public void insert(ContentsDto contentsDto) {
		getSqlSession().insert("contentsQuery.insert", contentsDto);
		
	}
}
